<HTML>
<HEAD>
  <!-- Created with AOLpress/2.0 -->
  <!-- AP: Created on: 11-Feb-2001 -->
  <!-- AP: Last modified: 16-Apr-2004 -->
  <LINK REL="icon" href="fftype16.png">
  <TITLE>High level description of what each source file contains...</TITLE>
  <LINK REL="stylesheet" TYPE="text/css" HREF="FontForge.css">
</HEAD>
<BODY>
<DIV id="in">
<H1 ALIGN=Center>
  High level description of what each source file
  contains...<FONT COLOR="Red"><BR>
  <SMALL><SMALL><STRONG>This page is grievously out of
  date</STRONG></SMALL></SMALL></FONT>
</H1>
<UL>
  <LI>
    <A HREF="#Header">Header files</A>
  <LI>
    <A HREF="#Source">Source files</A>
  <LI>
    <A HREF="http://bibliofile.duhs.duke.edu/gww/FreeWare/LibGUnicode/index.html">unicode
    library docs</A>
  <LI>
    <A HREF="http://bibliofile.duhs.duke.edu/gww/FreeWare/LibGDraw/index.html">unicode
    widget docs</A>
</UL>
<H2>
  <A NAME="Header">Header Files</A>
</H2>
<DL>
  <DT>
    edgelist.h
  <DD>
    This contains the data structures used by the rasterizer routines (splinefill.c),
    but it turns out that the same basic mechanism is used for a number of other
    things, autohint.c, splineoverlap.c, perhaps others.
  <DT>
    fontforge.h
  <DD>
    This is a general header which just includes other headers. Every source
    file in this directory should include it.
  <DT>
    fontforgeui.h
  <DD>
    Another general header file which includes others and defines a few global
    variables. All UI source files should include this.
  <DT>
    psfont.h
  <DD>
    These data structures are used by parsepfa.c as a temporary resting place
    for a postscript font before it gets converted into a SplineFont (splinefont.h)
    by calling SplineFontFromPSFont in splineutil.c
  <DT>
    splinefont.h
  <DD>
    <A HREF="splinefont.html">This one contains all the basic data structures
    of the program.</A>
  <DT>
    views.h
  <DD>
    <A HREF="views.html">This contains the basic UI data structures.</A>
  <DT>
</DL>
<H2>
  <A NAME="Source">Source Files</A>
</H2>
<DL>
  <DT>
    autohint.c
  <DD>
    Contains the routines which guess at postscript hints.
  <DT>
    autosave.c
  <DD>
    Contains a few basic routines that handle autosaving, but most of the real
    work is done in sfd.c
  <DT>
    autowidth.c
  <DD>
    Guesses at good widths for characters and good kerning for them. Creates
    a dialog to get guidance from the user and the goes off and tries to guess
    reasonable values.
  <DT>
    bitmapdlg.c
  <DD>
    Handles the two dialogs for creating and recreating bitmaps. (The creating
    one creates an entire new bitmap font, the recreating one modifies an already
    existing font by regenerating the selected characters).
  <DT>
    bitmapview.c
  <DD>
    Does much of the basic work of the bitmap editor. Handles menus, events,
    etc.
  <DT>
    bvedit.c
  <DD>
    Some extra routines for editing bitmaps (bv =&gt; bitmapview). Handles floating
    selections, paste, translations, etc.
  <DT>
    charview.c
  <DD>
    Does the basic work for the spline glyph editor. Handles menus, events,
    dispatches mouse events to the appropriate tools, etc.
  <DT>
    charviewicons.c
  <DD>
    These are the icon resources for the images that appear in the info area
    of the spline editor above.
  <DT>
    cursors.c
  <DD>
    Defines the various cursors used.
  <DT>
    cvaddpoints.c
  <DD>
    Handles mouse events when the current tool is a point generator. charview.c
    will dispatch events to us. (cv =&gt; charview)
  <DT>
    cvexport.c
  <DD>
    The dialog to export data into a different format. Also (some of) the conversion
    routines for that format. (Also used to export xbm files from the bitmapview)
  <DT>
    cvgetinfo.c
  <DD>
    Contains the Get Info dispatcher and dialogs for the charview. There are
    several different types of info depending on the current selection and there's
    a dialog for each
    <UL>
      <LI>
	A point is selected
      <LI>
	A reference to another character is selected (in the foreground)
      <LI>
	An image is selected (in the background)
      <LI>
	Or if more than one thing is (or no things are) selected, then general
	information on the character itself<BR>
	This last is also used by the fontview.
    </UL>
  <DT>
    cvhints.c
  <DD>
    A series of trivial little dialogs and commands that allow the user to set
    postscript hints manually.
  <DT>
    cvimages.c
  <DD>
    Contains code to import stuff into a CharView, BitmapView or FontView. Initially
    it was only images into the CharView, but it has grown beyond its name. CharViews
    can import Images (gif, png, tiff, jpeg, xbm, xpm, sun raster, windows bmp,
    ...) into the background of a CharView. I'd like to be able to do this from
    the clipboard, but I don't know whether there's a standard way of moving
    images around there. Also can import eps files (very restricted) and xfig
    (not too well). BitmapViews can only import images into their foreground.
    I think only bitmaps but I forget. FontViews can import bdf fonts into their
    list of bitmaps.
  <DT>
    cvknife.c
  <DD>
    The dispatch file for mouse events when the knife tool is selected.
  <DT>
    cvpalettes.c
  <DD>
    Handles the two palettes associated with a CharvView, and the two palettes
    for a BitmapView, and the Char and BitmapView popup menus.
  <DT>
    cvpointer.c
  <DD>
    The dispatch file for mouse events when the pointer tool is selected.
  <DT>
    cvruler.c
  <DD>
    The dispatch file for mouse events when the ruler tool is selected.
  <DT>
    cvshapes.c
  <DD>
    The dispatch file for mouse events when one of the shape tools (rectangle,
    ellipse, polygon, star) is selected.
  <DT>
    cvstroke.c
  <DD>
    The dialog for the expand stroke command. Also some of the routines which
    do the work. See also splinestroke.c
  <DT>
    cvtranstools.c
  <DD>
    The dispatch file for mouse events when one of the transform tools (scale,
    rotate, flip, skew) is selected.
  <DT>
    cvundoes.c
  <DD>
    Contains the routines that handle Undoes, Redoes and Copy/Paste for CharViews,
    BitmapViews and FontViews.
  <DT>
    dumpbdf.c
  <DD>
    Writes a bdf file.
  <DT>
    dumppfa.c
  <DD>
    Writes a postscript file. pfa, pfb, type3, type0. See also splinesave.c.
  <DT>
    fontinfo.c
  <DD>
    Contains the fontinfo dialog and the routines to reencode a font.
  <DT>
    fontview.c
  <DD>
    The main file for the fontview. Menu dispatcher, event handler. Basic Font
    level routines.
  <DT>
    fvcomposit.c
  <DD>
    The file that figures out how to build a composite character for you (ie.
    for Agrave will put a reference to A in your character, and a reference to
    grave and then will position the accent on top of A nicely). Operates on
    both the splines and the bitmaps.
  <DT>
    fvfonts.c
  <DD>
    Contains the dialogs and the functions for the Merge Fonts and Interpolate
    Fonts commands
  <DT>
    fvimportbdf.c
  <DD>
    The routine which reads in a bdf font. (note the font selection dialog is
    in cvimages.c)
  <DT>
    fvmetrics.c
  <DD>
    The dialog and routines for autowidth and autokern.
  <DT>
    images.c
  <DD>
    icon resources for the images used in the palettes. There's no good reason
    why this isn't merged in with charviewicons.c
  <DT>
    metricsview.c
  <DD>
    The main file for the metricsview. Menu dispatcher, event hander. Most of
    the functionality.
  <DT>
    print.c
  <DD>
    Handles the print and pagesetup dialogs.
  <DT>
    parsepfa.c
  <DD>
    Parses a postscript font. Doesn't get the encoding of a type0 font. Type3s
    are too free form for me to be able to interpret all (or even most?) of them.
    But we can at least read in the type3s we write out (unless they contain
    images). Some of the work also done in psread.c and splineutil.c
  <DT>
    parsettf.c
  <DD>
    Parses a TTF (or OTF) font file, and converts from quadratic B&eacute;zier
    to cubic B&eacute;zier (easy).
  <DT>
    prefs.c
  <DD>
    Preference dialog.
  <DT>
    psread.c
  <DD>
    This is our postscript interpreter for various flavors of postscript-- eps
    files, type3s, type1s, type2s, etc. It can't handle much.
  <DT>
    psunicodenames.c
  <DD>
    A list of all the adobe standard names for unicode characters in postscript.
    Any NULL entry in this array gets an algorithmically generated name uni%04X
  <DT>
    scripting.c
  <DD>
    All the routines to handle scripts
  <DT>
    savefontdlg.c
  <DD>
    Dialog and dispatcher for the Generate Fonts command.
  <DT>
    sfd.c
  <DD>
    Routines to write and read our spline font database format
    (<A HREF="sfdformat.html">sfd</A>). Also routines to handle autosave files
    which are basically just the bits of the font which have changed written
    out in sfd format with a few extra headers to say what these changes should
    be applied to.
  <DT>
    splashimage.c
  <DD>
    The resource containing the splash image.
  <DT>
    splinefill.c
  <DD>
    The routines that do rasterizing (and anti-aliasing). Also provides skeleton
    routines for autohinting, remove overlap, etc. which use a similar structure.
  <DT>
    splineoverlap.c
  <DD>
    The routines which implement the remove overlap command.
  <DT>
    splinesave.c
  <DD>
    Various helper routines when saving a postscript (and to a lesser extent
    TTF) font. Converts to type1 or type2 commands. Figures out optimal referencing.
  <DT>
    splinesaveafm.c
  <DD>
    Generates an afm file.
  <DT>
    splinestroke.c
  <DD>
    More routines to handle expand stroke.
  <DT>
    splineutil.c
  <DD>
    A bunch of utility routines. Converts postscript type1 strings into SplineChars.
    Figures bounding boxes. Handles updating references and dependencies. Figures
    linear approximations to splines for drawing. Figures clockwise,
    counter-clockwise. Guesses at good pointtypes when loading in postscript/ttf
    fonts. Copies SplinePointLists. Transforms SplinePointLists. Solves (approximates
    a solution) cubic equations. Finds points of inflection. Figures out if a
    point is "near" a spline.
  <DT>
    splineutil2.c
  <DD>
    More utility functions. Determines if a spline is linear (even if its control
    points aren't degenerate, we can still get spines which trace out a line,
    for instance if both control points are on the line between the to base points).
    Finds (approximates) the intersection of two splines. Aproximate a spline
    from a set of points (used by MergePoint, inserting a point onto a spline,
    and many other things). The Merge command itself. The Simplify command. Commands
    to remove tiny spline segments (these can confuse the Overlap routine, so
    we take them out before it does anything). Routine to create a new SplineFont.
    Routines to make sure the control points of tangent points continue to point
    in the right direction even when the point is moved. Routines to figure good
    default values for control points on new points (and on points where the
    user has not set the control points him/herself when that point is moved).
    Determines if any point on a path is selected. Reverses the direction of
    a closed path.
  <DT>
    stamp.c
  <DD>
    Time stamp of when I last built.
  <DT>
    stamper.c
  <DD>
    Program which generates time stamp. (stamp.c)
  <DT>
    start.c
  <DD>
    main routine. Initializes things and reads comand line arguments. Handles
    the splash screen. Top dispatcher for autosave.
  <DT>
    threaddummy.c
  <DD>
    contains a dummy pthread_create so I don't need to drag in pthreads when
    I'm not interested in that section of gio.
  <DT>
    tottf.c
  <DD>
    Saves a true type or open type font. see also splinesave.c for reference
    character optimization and for OpenType Type2 conversion routines.
  <DT>
    transform.c
  <DD>
    Transform dialog and dispatch routines.
  <DT>
    uiutil.c
  <DD>
    Utilities for the user interface.
  <DT>
    utils.c
  <DD>
    Hmm. this is blank.
  <DT>
    windowmenu.c
  <DD>
    Builds and dispatches the window menu.
</DL>
<P>
<P ALIGN=Center>
-- <A HREF="files.html">Prev</A> -- <A HREF="overview.html">TOC</A> --
<A HREF="sfdformat.html">Next</A> --
</DIV>
</BODY></HTML>
